import unittest


# 创建测试套件对象
import app
from lib.HTMLTestRunner_PY3 import HTMLTestRunner
from script.test_empApi import TestEmpApi
from script.test_login_params import TestLoginParams

suite = unittest.TestSuite()
# 在测试套件对象中添加测试用例类
suite.addTest(unittest.makeSuite(TestEmpApi))
suite.addTest(unittest.makeSuite(TestLoginParams))

# 指定测试报告存放的位置
report_path = app.BASE_PATH + "/report/report.html"
# 实例化HTML TestRunner 对象
with open(report_path,mode="wb") as f:
    runner = HTMLTestRunner(f)
# 执行测试套件
    runner.run(suite)